federation/composition: fix coercion rules when we expand supergraphs#8770
Merged
briannafugate408 merged 9 commits intodevfrom Jan 20, 2026
Merged
federation/composition: fix coercion rules when we expand supergraphs#8770briannafugate408 merged 9 commits intodevfrom
briannafugate408 merged 9 commits intodevfrom
Conversation
Contributor
✅ Docs preview has no changesThe preview was not built because there were no changes. Build ID: 40c39aa2fd4e059fd7252e61 |
Contributor
|
@briannafugate408, please consider creating a changeset entry in |
f29acd4 to
a55cc87
Compare
a55cc87 to
754d55f
Compare
b2dcc93 to
b9aacf4
Compare
duckki
reviewed
Jan 16, 2026
duckki
requested changes
Jan 16, 2026
Contributor
duckki
left a comment
There was a problem hiding this comment.
Just a few minor suggestions.
…rge strategies and compose directive tests to be valid even before coercion, update comment about scalar to list coercion, and call coercion in parse to prevent calling multiple times from expand_schema.
35f8c25 to
782fc60
Compare
290989c to
c726283
Compare
duckki
approved these changes
Jan 20, 2026
Contributor
|
I just re-ran the failed test. |
10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes value coercion during subgraph schema expansion. Previously, directive argument values and field argument defaults were not being properly coerced after directive definitions were expanded, leading to validation failures for schemas that relied on type coercion rules.
When a subgraph schema uses shorthand syntax like
@key(fields: ["id"])(a single-element list where a String is expected), the schema would fail validation because the coercion from["id"] → "id"wasn't happening during the expansion phase.coerce_schema_values()which runs after directive definitions are expanded inexpand_schema(). This function coerces:Checklist
Complete the checklist (and note appropriate exceptions) before the PR is marked ready-for-review.
Exceptions
Note any exceptions here
Notes
Footnotes
Tick whichever testing boxes are applicable. If you are adding Manual Tests, please document the manual testing (extensively) in the Exceptions. ↩